const UserCtrl = require("./user.ctrl");
const checkUserInfo = require("../../middleware/checkUserInfo");
const { checkPermission } = require("../../config/acl");
module.exports = (router) => {
	router.get("/users", checkUserInfo, checkPermission("list_user"), UserCtrl.list);
	router.post("/users", checkUserInfo, checkPermission("create_user"), UserCtrl.create);
	router.put("/users", checkUserInfo, checkPermission("create_user"), UserCtrl.update);
	router.delete("/users/:ids", checkUserInfo, checkPermission("delete_user"), UserCtrl.del);
	router.post("/login", UserCtrl.login);
	router.post("/logout", checkUserInfo, UserCtrl.logout);
};